/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import java.util.HashMap;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ import java.util.UUID;
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.entity.Entity;
/*     */ import net.minecraftforge.common.MinecraftForge;
/*     */ import net.minecraftforge.fml.client.FMLClientHandler;
/*     */ import net.minecraftforge.fml.common.Mod;
/*     */ import net.minecraftforge.fml.common.Mod.EventHandler;
/*     */ import net.minecraftforge.fml.common.event.FMLInitializationEvent;
/*     */ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
/*     */ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
/*     */ import net.minecraftforge.fml.common.gameevent.TickEvent;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ @Mod(modid = "dynamiclights_onglowname_dragoncore", name = "Dynamic Lights on glow name", version = "1.0.0", dependencies = "required-after:dynamiclights_dragoncore", acceptedMinecraftVersions = "[1.12.2]")
/*     */ public class xaa
/*     */ {
/*     */   private Minecraft z;
/*     */   private long i;
/*     */   private long w;
/*     */   private Map<UUID, eos/moe/dragoncore/xda> q;
/*     */   private boolean g;
/*     */   
/*     */   @EventHandler
/*     */   public void v(FMLPreInitializationEvent fMLPreInitializationEvent) {
/*  37 */     this.w = 500L;
/*  38 */     MinecraftForge.EVENT_BUS.register(this);
/*     */   }
/*     */   
/*     */   @EventHandler
/*     */   public void v(FMLInitializationEvent fMLInitializationEvent) {
/*  43 */     this.z = FMLClientHandler.instance().getClient();
/*  44 */     this.i = System.currentTimeMillis();
/*  45 */     this.q = new HashMap<>();
/*  46 */     this.g = false;
/*     */   }
/*     */   
/*     */   @SubscribeEvent
/*     */   public void v(TickEvent.ClientTickEvent clientTickEvent) {
/*  51 */     if (!nm.g) {
/*     */       return;
/*     */     }
/*     */     
/*  55 */     if (this.z.field_71441_e != null && System.currentTimeMillis() > this.i) {
/*  56 */       this.i = System.currentTimeMillis() + this.w;
/*     */       
/*  58 */       if (!this.g) {
/*  59 */         Thread thread = new eos/moe/dragoncore/hja(this, this.z.field_71441_e.field_72996_f);
/*  60 */         thread.setPriority(1);
/*  61 */         thread.start();
/*  62 */         this.g = true;
/*     */       } 
/*     */     } 
/*     */   }
/*     */   
/*     */   private class eos/moe/dragoncore/hja extends Thread {
/*     */     private final Entity[] q;
/*     */     
/*     */     public eos/moe/dragoncore/hja(xaa this$0, List list) {
/*  71 */       this.q = (Entity[])list.toArray((Object[])new Entity[0]);
/*     */     }
/*     */ 
/*     */     
/*     */     public void run() {
/*  76 */       Map<Object, Object> map = new HashMap<>();
/*  77 */       for (Entity entity : this.q) {
/*  78 */         xaa.eos/moe/dragoncore/xda eos/moe/dragoncore/xda = (xaa.eos/moe/dragoncore/xda)xaa.v(this.g).get(entity.func_110124_au());
/*     */         
/*  80 */         if (eos/moe/dragoncore/xda != null) {
/*  81 */           map.put(entity.func_110124_au(), eos/moe/dragoncore/xda);
/*  82 */           xaa.v(this.g).remove(entity.func_110124_au());
/*  83 */         } else if (xaa.v(entity) > 0) {
/*  84 */           map.put(entity.func_110124_au(), new xaa.eos/moe/dragoncore/xda(entity));
/*     */         } 
/*     */       } 
/*  87 */       for (xaa.eos/moe/dragoncore/xda eos/moe/dragoncore/xda : xaa.v(this.g).values()) {
/*  88 */         xaa.eos/moe/dragoncore/xda.v(eos/moe/dragoncore/xda);
/*     */       }
/*  90 */       for (xaa.eos/moe/dragoncore/xda eos/moe/dragoncore/xda : map.values()) {
/*  91 */         eos/moe/dragoncore/xda.h();
/*     */       }
/*     */ 
/*     */       
/*  95 */       xaa.v(this.g).clear();
/*  96 */       xaa.v(this.g).putAll(map);
/*  97 */       xaa.v(this.g, false);
/*     */     }
/*     */   }
/*     */ 
/*     */   
/*     */   private static class eos/moe/dragoncore/xda
/*     */     implements ba
/*     */   {
/*     */     private Entity w;
/*     */     private int q;
/*     */     private boolean g;
/*     */     
/*     */     public eos/moe/dragoncore/xda(Entity entity) {
/* 110 */       this.g = false;
/* 111 */       this.w = entity;
/*     */     }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */     
/*     */     public void h() {
/* 119 */       this.q = xaa.v(this.w);
/*     */       
/* 121 */       if (!this.g && this.q > 0) {
/* 122 */         z();
/* 123 */       } else if (this.g && this.q < 1) {
/* 124 */         v();
/*     */       } 
/*     */     }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */     
/*     */     public Entity v() {
/* 140 */       return this.w;
/*     */     }
/*     */ 
/*     */     
/*     */     public int v() {
/* 145 */       return this.q;
/*     */     }
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\xaa.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */